From 2c2cb135ca0474d154ae054c42bb1634ac10f622 Mon Sep 17 00:00:00 2001 From: Felix Date: Sat, 4 Jan 2025 16:06:03 +0100 Subject: [PATCH] Log path strings directly instead of accumulating Signed-off-by: Felix --- src/libsync/syncengine.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/libsync/syncengine.cpp b/src/libsync/syncengine.cpp index 368d0f8c8..30fa24115 100644 --- a/src/libsync/syncengine.cpp +++ b/src/libsync/syncengine.cpp @@ -1216,12 +1216,14 @@ void SyncEngine::setLocalDiscoveryOptions(LocalDiscoveryStyle style, std::set QString { - first += ", " + second; - return first; - }); - - qCInfo(lcEngine()) << "paths to discover locally" << allPaths; + if (lcEngine().isInfoEnabled()) { + // only execute if logging is enabled + auto debug = qInfo(lcEngine); + debug << "paths to discover locally"; + for (auto path : _localDiscoveryPaths) { + debug << path; + } + } // Normalize to make sure that no path is a contained in another. // Note: for simplicity, this code consider anything less than '/' as a path separator, so for -- 2.39.5